package com.wzdigit.wms.basic.domain.dtos.inventory;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
//@EqualsAndHashCode 这个不能开
public class SnInforGoodsDto {


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof SnInforGoodsDto)) return false;

        SnInforGoodsDto that = (SnInforGoodsDto) o;

        if (owner != null ? !owner.equals(that.owner) : that.owner != null) return false;
        if (skuId != null ? !skuId.equals(that.skuId) : that.skuId != null) return false;
        if (factory != null ? !factory.equals(that.factory) : that.factory != null) return false;
        if (vendorId != null ? !vendorId.equals(that.vendorId) : that.vendorId != null) return false;
        if (lotno != null ? !lotno.equals(that.lotno) : that.lotno != null) return false;
        if (invAttr != null ? !invAttr.equals(that.invAttr) : that.invAttr != null) return false;
        return qaStatus != null ? qaStatus.equals(that.qaStatus) : that.qaStatus == null;
    }

    @Override
    public int hashCode() {
        int result = owner != null ? owner.hashCode() : 0;
        result = 31 * result + (skuId != null ? skuId.hashCode() : 0);
        result = 31 * result + (factory != null ? factory.hashCode() : 0);
        result = 31 * result + (vendorId != null ? vendorId.hashCode() : 0);
        result = 31 * result + (lotno != null ? lotno.hashCode() : 0);
        result = 31 * result + (invAttr != null ? invAttr.hashCode() : 0);
        result = 31 * result + (qaStatus != null ? qaStatus.hashCode() : 0);
        return result;
    }

    /**
     * 货品ID
     */
    @ApiModelProperty(value = "货品ID")
    @TableId(value = "GOODS_ID", type = IdType.INPUT)
    private Integer goodsId;
    /**
     * 货品条码
     */
    @ApiModelProperty(value = "货品条码")
    @TableField(value = "GOODS_SN")
    private String goodsSn;

    /**
     * 货主，客户主数据中 客户类型=货主，取客户ID
     */
    @ApiModelProperty(value = "货主，客户主数据中 客户类型=货主，取客户ID")
    @TableField(value = "OWNER")
    private Integer owner;
    /**
     * 货品
     */
    @ApiModelProperty(value = "货品")
    @TableField(value = "SKU_ID")
    private Integer skuId;
    /**
     * 工厂代码(组织)，如5500,5520
     */
    @ApiModelProperty(value = "工厂代码(组织)，如5500,5520")
    @TableField(value = "FACTORY")
    private String factory;
    /**
     * 供应商IKEY
     */
    @ApiModelProperty(value = "供应商IKEY")
    @TableField(value = "VENDOR_ID")
    private Integer vendorId;

    /**
     * 系统通过批次属性生成的批次号
     */
    @ApiModelProperty(value = "系统通过批次属性生成的批次号")
    @TableField(value = "LOTNO")
    private String lotno;
    /**
     * 库存性质(特殊采购性质)，K为寄售 ,E为销售订单,空白为标准转换为S
     */
    @ApiModelProperty(value = "库存性质(特殊采购性质)，K为寄售 ,E为销售订单,空白为标准转换为S")
    @TableField(value = "INV_ATTR")
    private String invAttr;
    /**
     * 品质状态
     */
    @ApiModelProperty(value = "品质状态")
    @TableField(value = "QA_STATUS")
    private Integer qaStatus;

    /**
     * 采购订单
     */
    @ApiModelProperty(value = "采购订单")
    @TableField(value = "PO_NO")
    private String poNo;


    /**
     * 数量
     */
    @TableField("QTY")
    private BigDecimal qty;
}
